<?php

$blogdata='NULL';
$blog='NULL';
require('../private.php');
require_once('admin.php');
$optiondomain = 'system';

check_admin_referer('update-profile_' . $user_ID);

validateToken($_POST['token'], 'profile-update.php', 'update', $_POST['checkuser_id'], true);
if ( !$_POST )
	die( __('No post?') );

$errors = edit_user($user_ID);

if (count($errors) != 0)
	$_SESSION['profile_error'] = $errors;

if ( !isset( $_POST['rich_editing'] ) )
	$_POST['rich_editing'] = 'false';
update_user_option( $current_user->id, 'rich_editing', $_POST['rich_editing'], true );

do_action('personal_options_update');

//if ( 'profile' == $_POST['from'] )
	$to = LURL."/profile?updated=true";
//else
//	$to = "profile.php&updated=true";

validateToken($_POST['token'], 'profile-update.php', 'update', $_POST['checkuser_id']);
wp_redirect( $to );
exit;

?>